## VERSION 4
CXX = g++
TARGET = hello
SRC = $(wildcard *.cpp)
OBJ = $(patsubst %.cpp, %.o, $(SRC))
# OBJ = main.o factorial.o printhello.o

CFLAGS = -c -Wall

$(TARGET): $(OBJ)
	$(CXX) -o $@ $^


%.o: %.cpp
	$(CXX) $(CFLAGS) $< -o $@

.PHONY: clean
clean:
	rm -f *.o $(TARGET).exe